<?php #//AJAX PHP PENNY AUCTION v.1.1

#///////////////////////////////////////////////////////////
#//  COPYRIGHT 2009 Aaron Helmlinger ALL RIGHTS RESERVED  //
#///////////////////////////////////////////////////////////
   include "../includes/config.inc.php";
include "loggedin.inc.php";
             
                                 
          if($_POST[update])  {

       
       $activated = $_POST[activated];
                                $frequency = $_POST[frequency];
                                $minimum = $_POST[minimum];
                                $maximum = $_POST[maximum];
                                $openingtime = $_POST[openingtime];
                                $closingtime = $_POST[closingtime];
                                 $firstbid = $_POST[firstbid];
$query2="UPDATE PHPAUCTIONXL_unique_settings SET activated='$activated', frequency='$frequency', minimum='$minimum', maximum='$maximum', openingtime='$openingtime', closingtime='$closingtime', firstbid='$firstbid' WHERE id='1'";
       
mysql_query($query2);
       
         }     
       
         $query_settings = "select * from PHPAUCTIONXL_unique_settings where id='1'";
                             $query_settings2 =  mysql_query ($query_settings);
                                $activated = mysql_result($query_settings2,0,"activated");
                                $frequency = mysql_result($query_settings2,0,"frequency");
                                $minimum = mysql_result($query_settings2,0,"minimum");
                                $maximum = mysql_result($query_settings2,0,"maximum");
                                $openingtime = mysql_result($query_settings2,0,"openingtime");
                                $closingtime = mysql_result($query_settings2,0,"closingtime");
                                $firstbid = mysql_result($query_settings2,0,"firstbid");
                                
                                

  ?>
  
  
  
  


<HTML>
<HEAD>
<link rel='stylesheet' type='text/css' href='style.css' />
<link href="css/main.css" rel="stylesheet" type="text/css">
</HEAD>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">





<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td>
    
       <? // -------------------------- Admin Tool Heading --------------------------------------?>
       
       
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="titulo">
        <tr> 
          <td class="icono">
          
          
          <img src="images/users_icon2.gif" width="17" height="23" >
          
          
          </td>
          <td class="breadcrumbs"><p><span><?=$MSG_25_0010?></span>&nbsp;&gt;&gt;&nbsp;<?=$MSG_AJAX_ADMIN_UNIQUE_USERS_HEADING?></p></td>
        </tr>
      </table>
      
      
      
      </td>
  </tr>
  <tr>
    <td align="center" valign="middle">&nbsp;</td>
  </tr>
    <tr> 
    <td align="center" valign="middle">
    
    
    
<TABLE BORDER=0 WIDTH=100% CELLPADDING=0 CELLSPACING=0 BGCOLOR="#FFFFFF">
<TR>
<TD align="center">
<BR>
<FORM NAME=conf ACTION=<?=basename($_SERVER['PHP_SELF'])?> METHOD=POST>


  <? // -------------------------- LIGHT BLUE TITLE BAR --------------------------------------?>

	<TABLE WIDTH="95%" BORDER="0" CELLSPACING="0" CELLPADDING="0"  class="base" ALIGN="CENTER" style="border:1px solid #ccc;">
		<TR>
			<TD ALIGN=CENTER class=title>
				<p><? print $MSG_AJAX_ADMIN_UNIQUE_USERS_TITLE; ?></p>
			</TD>
		</TR>
		
		
		
		<TR>
		<TD>
		
    
    
    <TABLE WIDTH=100% ALIGN="CENTER" CELLPADDING=0 cellspacing="0" BGCOLOR="#FFFFFF">
		
 <? // -------------------------- ERROR BAR --------------------------------------?>    
 
 <? $ERR = $MSG_AJAX_ADMIN_UNIQUE_USERS_ERROR; if ($ERR) { ?>   
    	<TR>
				<TD COLSPAN="2"  class="error"><B>
					<p><? 
          
              
          print $ERR; ?></p>
					</B></TD>
			</TR>
	<? } ?>	
    
    	
			
			
 <? // -------------------------- WHITE BAR --------------------------------------?> 			
				
        <TR>
        <TD WIDTH="125"> 
					<p class="blue"><? print $MSG_AJAX_ADMIN_UNIQUE_USERS_ON_OFF; ?></p>
					</TD>
					
					
				<TD WIDTH="405">
				
					
					 
<input type="radio" name="activated" value="1" <? if ( $activated == 1 ) echo checked ?> /> <? print $MSG_AJAX_ADMIN_SELL_ON; ?> &nbsp;&nbsp; <input type="radio" name="activated" value="0" <? if ( $activated == 0 ) echo checked ?> /> <? print $MSG_AJAX_ADMIN_SELL_OFF; ?>  &nbsp;&nbsp;&nbsp;&nbsp;

   <? print  $MSG_AJAX_ADMIN_UNIQUE_USERS_ON_OFF_NOTE; ?>
						
					
				 </TD>
			</TR>
			
		 <? // -------------------------- GREY BAR --------------------------------------?>	
			
			<TR>
				<TD WIDTH="125" class="gris">
					<p class="blue"><? print $MSG_AJAX_ADMIN_UNIQUE_USERS_FREQUENCY; ?></p>
					</TD>
				<TD WIDTH="405" class="gris">
				
				    <?
				    if ( $frequency == 2 ) $frequency2 = "10";
				     if ( $frequency == 3 ) $frequency2 = "9";
				     if ( $frequency == 4 ) $frequency2 = "8";
				     if ( $frequency == 5 ) $frequency2 = "7";
				     if ( $frequency == 6 ) $frequency2 = "6";
				     if ( $frequency == 7 ) $frequency2 = "5";
				     if ( $frequency == 8 ) $frequency2 = "4";
				     if ( $frequency == 9 ) $frequency2 = "3";
				     if ( $frequency == 10 ) $frequency2 = "2";
				     if ( $frequency == 11 ) $frequency2 = "1";
				     
				       ?>
				
				
				 <SELECT NAME="frequency" >
<OPTION VALUE="<? print $frequency; ?>" ><? print $frequency2; ?> 
<OPTION VALUE=11 >1
<OPTION VALUE=10 >2
<OPTION VALUE=9 >3
<OPTION VALUE=8 >4
<OPTION VALUE=7 >5
<OPTION VALUE=6 >6
<OPTION VALUE=5 >7
<OPTION VALUE=4 >8
<OPTION VALUE=3 >9
<OPTION VALUE=2 >10
</SELECT>   
		
		
	
		
     &nbsp;&nbsp;  <? print  $MSG_AJAX_ADMIN_UNIQUE_USERS_FREQUENCY_NOTE; ?>	
					
				</TD>
			</TR>
			
 <? // -------------------------- WHITE BAR --------------------------------------?> 			
				 <TR>
        <TD WIDTH="125"> 
					<p class="blue"><? print $MSG_AJAX_ADMIN_UNIQUE_USERS_START; ?></p>
					</TD>
					
					
				<TD WIDTH="405">
			
	<?
          
          
          if ( $openingtime == 1 ) $openingtime2 = "1:00 am";
          if ( $openingtime == 2 ) $openingtime2 = "2:00 am"; 
          if ( $openingtime == 3 ) $openingtime2 = "3:00 am";  
          if ( $openingtime == 4 ) $openingtime2 = "4:00 am";  
          if ( $openingtime == 5 ) $openingtime2 = "5:00 am"; 
          if ( $openingtime == 6 ) $openingtime2 = "6:00 am"; 
          if ( $openingtime == 7 ) $openingtime2 = "7:00 am"; 
          if ( $openingtime == 8 ) $openingtime2 = "8:00 am"; 
          if ( $openingtime == 9 ) $openingtime2 = "9:00 am"; 
          if ( $openingtime == 10 ) $openingtime2 = "10:00 am"; 
          if ( $openingtime == 11 ) $openingtime2 = "11:00 am";
           if ( $openingtime == 12 ) $openingtime2 = "12:00 pm";
           if ( $openingtime == 13 ) $openingtime2 = "1:00 pm";
           if ( $openingtime == 14 ) $openingtime2 = "2:00 pm";
           if ( $openingtime == 15 ) $openingtime2 = "3:00 pm";
           if ( $openingtime == 16 ) $openingtime2 = "4:00 pm";
           if ( $openingtime == 17 ) $openingtime2 = "5:00 pm";
           if ( $openingtime == 18 ) $openingtime2 = "6:00 pm";
           if ( $openingtime == 19 ) $openingtime2 = "7:00 pm";
           if ( $openingtime == 20 ) $openingtime2 = "8:00 pm";
           if ( $openingtime == 21 ) $openingtime2 = "9:00 pm";
           if ( $openingtime == 22 ) $openingtime2 = "10:00 pm";
           if ( $openingtime == 23 ) $openingtime2 = "11:00 pm";
            if ( $openingtime == 0 ) $openingtime2 = "12:00 am";
          
           
           
          ?>			
				
				
				
				 <SELECT NAME="openingtime" >
<OPTION VALUE="<? print $openingtime; ?>" ><? print $openingtime2; ?> 
<OPTION VALUE=1 >1:00 am
<OPTION VALUE=2 >2:00 am
<OPTION VALUE=3 >3:00 am
<OPTION VALUE=4 >4:00 am
<OPTION VALUE=5 >5:00 am
<OPTION VALUE=6 >6:00 am
<OPTION VALUE=7 >7:00 am
<OPTION VALUE=8 >8:00 am
<OPTION VALUE=9 >9:00 am
<OPTION VALUE=10 >10:00 am
<OPTION VALUE=11 >11:00 am
<OPTION VALUE=12 >12:00 pm
<OPTION VALUE=13 >1:00 pm
<OPTION VALUE=14 >2:00 pm
<OPTION VALUE=15 >3:00 pm
<OPTION VALUE=16 >4:00 pm
<OPTION VALUE=17 >5:00 pm
<OPTION VALUE=18 >6:00 pm
<OPTION VALUE=19 >7:00 pm
<OPTION VALUE=20 >8:00 pm
<OPTION VALUE=21 >9:00 pm
<OPTION VALUE=22 >10:00 pm
<OPTION VALUE=23 >11:00 pm
<OPTION VALUE=0 >12:00 am
</SELECT>   
			&nbsp;&nbsp;
       <? print  $MSG_AJAX_ADMIN_UNIQUE_USERS_START_NOTE; ?>	
				
			
					
				</TD>
			</TR>		
		
					
					
					
          
          
		
		
	 <? // -------------------------- GREY BAR --------------------------------------?>	
			
			<TR>
				<TD WIDTH="125" class="gris">
					<p class="blue"><? print $MSG_AJAX_ADMIN_UNIQUE_USERS_END; ?></p>
					</TD>
				<TD WIDTH="405" class="gris">
				
			
					<?
          
          
          if ( $closingtime == 1 ) $closingtime2 = "1:00 am";
          if ( $closingtime == 2 ) $closingtime2 = "2:00 am"; 
          if ( $closingtime == 3 ) $closingtime2 = "3:00 am";  
          if ( $closingtime == 4 ) $closingtime2 = "4:00 am";  
          if ( $closingtime == 5 ) $closingtime2 = "5:00 am"; 
          if ( $closingtime == 6 ) $closingtime2 = "6:00 am"; 
          if ( $closingtime == 7 ) $closingtime2 = "7:00 am"; 
          if ( $closingtime == 8 ) $closingtime2 = "8:00 am"; 
          if ( $closingtime == 9 ) $closingtime2 = "9:00 am"; 
          if ( $closingtime == 10 ) $closingtime2 = "10:00 am"; 
          if ( $closingtime == 11 ) $closingtime2 = "11:00 am";
           if ( $closingtime == 12 ) $closingtime2 = "12:00 pm";
           if ( $closingtime == 13 ) $closingtime2 = "1:00 pm";
           if ( $closingtime == 14 ) $closingtime2 = "2:00 pm";
           if ( $closingtime == 15 ) $closingtime2 = "3:00 pm";
           if ( $closingtime == 16 ) $closingtime2 = "4:00 pm";
           if ( $closingtime == 17 ) $closingtime2 = "5:00 pm";
           if ( $closingtime == 18 ) $closingtime2 = "6:00 pm";
           if ( $closingtime == 19 ) $closingtime2 = "7:00 pm";
           if ( $closingtime == 20 ) $closingtime2 = "8:00 pm";
           if ( $closingtime == 21 ) $closingtime2 = "9:00 pm";
           if ( $closingtime == 22 ) $closingtime2 = "10:00 pm";
           if ( $closingtime == 23 ) $closingtime2 = "11:00 pm";
            if ( $closingtime == 0 ) $closingtime2 = "12:00 am";
          
           
           
          ?>
					
					 <SELECT NAME="closingtime" >
<OPTION VALUE="<? print $closingtime; ?>" ><? print $closingtime2; ?> 
<OPTION VALUE=1 >1:00 am
<OPTION VALUE=2 >2:00 am
<OPTION VALUE=3 >3:00 am
<OPTION VALUE=4 >4:00 am
<OPTION VALUE=5 >5:00 am
<OPTION VALUE=6 >6:00 am
<OPTION VALUE=7 >7:00 am
<OPTION VALUE=8 >8:00 am
<OPTION VALUE=9 >9:00 am
<OPTION VALUE=10 >10:00 am
<OPTION VALUE=11 >11:00 am
<OPTION VALUE=12 >12:00 pm
<OPTION VALUE=13 >1:00 pm
<OPTION VALUE=14 >2:00 pm
<OPTION VALUE=15 >3:00 pm
<OPTION VALUE=16 >4:00 pm
<OPTION VALUE=17 >5:00 pm
<OPTION VALUE=18 >6:00 pm
<OPTION VALUE=19 >7:00 pm
<OPTION VALUE=20 >8:00 pm
<OPTION VALUE=21 >9:00 pm
<OPTION VALUE=22 >10:00 pm
<OPTION VALUE=23 >11:00 pm
<OPTION VALUE=0 >12:00 am
</SELECT>   
			&nbsp;&nbsp;
       <? print  $MSG_AJAX_ADMIN_UNIQUE_USERS_END_NOTE; ?>	<BR><BR>			
      
       <? print  $MSG_AJAX_ADMIN_UNIQUE_USERS_24HOURS_NOTE; ?>		
					
					
					
					
				</TD>
			</TR>		
		
		
		
		
<? // -------------------------- WHITE BAR --------------------------------------?> 			
				 <TR>
        <TD WIDTH="125"> 
					<p class="blue"><? print $MSG_AJAX_ADMIN_UNIQUE_USERS_MINIMUM; ?></p>
					</TD>
					
					
				<TD WIDTH="405">
					
					
					 <SELECT NAME="minimum" >
<OPTION VALUE="<? print $minimum; ?>" ><? print $minimum; ?> 

<?


// GET NUMBER OF UNIQUE BIDDERS

$query = "select nick,id from PHPAUCTIONXL_users
         WHERE accounttype='unique1'";
$result = mysql_query($query);
$num_auction = mysql_num_rows($result);

 $i = 0;
while($i < $num_auction) {

echo "<OPTION VALUE=";
echo $i;
echo " >";
echo $i;

$i++;
}



?>

 
</SELECT>   

					
				</TD>
			</TR>		
		
		
	 <? // -------------------------- GREY BAR --------------------------------------?>	
			
			<TR>
				<TD WIDTH="125" class="gris">
					<p class="blue"><? print $MSG_AJAX_ADMIN_UNIQUE_USERS_MAXIMUM; ?></p>
					</TD>
				<TD WIDTH="405" class="gris">


    					
					 <SELECT NAME="maximum" >
<OPTION VALUE="<? print $maximum; ?>" ><? print $maximum; ?> 

<?


// GET NUMBER OF UNIQUE BIDDERS

$query = "select nick,id from PHPAUCTIONXL_users
         WHERE accounttype='unique1'";
$result = mysql_query($query);
$num_auction = mysql_num_rows($result);

 $i = 0;
while($i < $num_auction) {

echo "<OPTION VALUE=";
echo $i;
echo " >";
echo $i;

$i++;
}



?>

 
</SELECT>   

        <BR>
          <BR>
  <? print  $MSG_AJAX_ADMIN_UNIQUE_USERS_NO_BIDDERS_NOTE; ?>

					
					
				</TD>
			</TR>				
		
		
		
<? // -------------------------- WHITE BAR --------------------------------------?> 			
				 <TR>
        <TD WIDTH="125"> 
					<p class="blue"><? print $MSG_AJAX_ADMIN_UNIQUE_USERS_FIRSTBID; ?></p>
					</TD>
					
					
				<TD WIDTH="405">
					
					
	
	
	
	      <SELECT NAME="firstbid" >
<OPTION VALUE="<? print $firstbid; ?>" ><? print $firstbid; ?> 
<OPTION VALUE=0 >0
<OPTION VALUE=.25 >.25 
<OPTION VALUE=.5 >.5 
<OPTION VALUE=.75 >.75 
<OPTION VALUE=1.25 >1.25
<OPTION VALUE=1.5 >1.5
<OPTION VALUE=1.75 >1.75
<OPTION VALUE=2 >2
<OPTION VALUE=2 >2.25
<OPTION VALUE=2.5 >2.5
<OPTION VALUE=2.75 >2.75
<OPTION VALUE=3 >3
<OPTION VALUE=3.25 >3.25
<OPTION VALUE=3.5 >3.5
<OPTION VALUE=3.75 >3.75
<OPTION VALUE=4 >4
<OPTION VALUE=4.25 >4.25
<OPTION VALUE=4.5 >4.5
<OPTION VALUE=4.75 >4.75
<OPTION VALUE=5 >5
<OPTION VALUE=5.25 >5.25
<OPTION VALUE=5.5 >5.5
<OPTION VALUE=5.75 >5.75
<OPTION VALUE=6 >6
<OPTION VALUE=6.25 >6.25
<OPTION VALUE=6.5 >6.5
<OPTION VALUE=6.75 >6.75
<OPTION VALUE=7 >7
<OPTION VALUE=7.25 >7.25
<OPTION VALUE=7.5 >7.5
<OPTION VALUE=7.75 >7.75
<OPTION VALUE=8 >8
<OPTION VALUE=8.25 >8.25
<OPTION VALUE=8.5 >8.5
<OPTION VALUE=8.75 >8.75
<OPTION VALUE=9 >9
<OPTION VALUE=9.25 >9.25
<OPTION VALUE=9.5 >9.5
<OPTION VALUE=9.75 >9.75
<OPTION VALUE=10 >10
<OPTION VALUE=10.25 >10.25
<OPTION VALUE=10.5 >10.5
<OPTION VALUE=10.75 >10.75
<OPTION VALUE=11 >11
<OPTION VALUE=11.25 >11.25
<OPTION VALUE=11.5 >11.5
<OPTION VALUE=11.75 >11.75
<OPTION VALUE=12 >12
<OPTION VALUE=12.25 >12.25
<OPTION VALUE=12.5 >12.5
<OPTION VALUE=12.75 >12.75
<OPTION VALUE=13 >13
<OPTION VALUE=13.25 >13.25
<OPTION VALUE=13.5 >13.5
<OPTION VALUE=13.75 >13.75
<OPTION VALUE=14 >14
<OPTION VALUE=14.25 >14.25
<OPTION VALUE=14.5 >14.5
<OPTION VALUE=14.75 >14.75
<OPTION VALUE=15 >15
<OPTION VALUE=15.25 >15.25
<OPTION VALUE=15.5 >15.5
<OPTION VALUE=15.75 >15.75
<OPTION VALUE=16 >16
<OPTION VALUE=16.25 >16.25
<OPTION VALUE=16.5 >16.5
<OPTION VALUE=16.75 >16.75
<OPTION VALUE=17 >17
<OPTION VALUE=17.25 >17.25
<OPTION VALUE=17.5 >17.5
<OPTION VALUE=17.75 >17.75
<OPTION VALUE=18 >18
<OPTION VALUE=18.25 >18.25
<OPTION VALUE=18.5 >18.5
<OPTION VALUE=18.75 >18.75
<OPTION VALUE=19 >19
<OPTION VALUE=19.25 >19.25
<OPTION VALUE=19.5 >19.5
<OPTION VALUE=19.75 >19.75
<OPTION VALUE=20 >20
<OPTION VALUE=20.25 >20.25
<OPTION VALUE=20.5 >20.5
<OPTION VALUE=20.75 >20.75
<OPTION VALUE=21 >21
<OPTION VALUE=21.25 >21.25
<OPTION VALUE=21.5 >21.5
<OPTION VALUE=21.75 >21.75
<OPTION VALUE=22 >22
<OPTION VALUE=22.25 >22.25
<OPTION VALUE=22.5 >22.5
<OPTION VALUE=22.75 >22.75
<OPTION VALUE=23 >23
<OPTION VALUE=23.25 >23.25
<OPTION VALUE=23.5 >23.5
<OPTION VALUE=23.75 >23.75
<OPTION VALUE=24 >1 Day
<OPTION VALUE=48 >2 Days
<OPTION VALUE=72 >3 Days
<OPTION VALUE=96 >4 Days
<OPTION VALUE=120 >5 Days
<OPTION VALUE=144 >6 Days
<OPTION VALUE=168 >7 Days

</SELECT>  <BR><BR>
           <? print $MSG_AJAX_ADMIN_UNIQUE_USERS_FIRSTBID_NOTE; ?>


					
				</TD>
			</TR>			
		
		
		
		
		
		
		
		
		
		 

		</TABLE>
		
		  <INPUT TYPE=hidden NAME=update VALUE=1 >
		        <INPUT TYPE="submit" NAME="act" VALUE="<? print $MSG_530; ?>" class="action">
		 </form>
		
		</TD>
		</TR>
	</TABLE>
	</FORM>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
